02. Looking Forward

Capstone Component

Depending on where you live in the world, data persistence might have different meaning to you personally, but as a developer, you need to make sure your application serves a global audience. Allowing basic app functionality while offline can help your users without consistent or reliable internet enjoy your app while offline while simultaneously increasing reliability and functionality. What features in your application absolutely need online data to operate, or can they use cached data to function and synchronize when an internet connection is available? Start to identify what data components you need for functionality and think about their structure, data types, and possible persistence options.

In This Lesson

The Room database library is a powerful utility in providing data persistence options within your application. It allows for seamless storage and offline access to data required within your application. As you move through the lesson think about applications you use every day and answer the following:

  • When you open your favorite social media application, what data displays?
  • After the initial load, does anything happen? If so, why?
  • In applications that require login credentials, do you have to log in every time? How might you accomplish similar behavior?

Now, turn on Airplane mode on your device and open various applications:

  • Do they function? Fully? Partially?
  • What data is still available?
  • How might that be stored?
  • Can you change data or interact with the functions in any way?
  • What happens when you turn airplane mode off?